import request from '../utils/http'

// 订单详情
export const reqOrderDetail = () => request.get('/order/trade')
// 获取订单地址
export const reqOrderAddress = () => request.get('/userAddress/getOrderAddress')
// 从商品详情页处点击立即购买
export const reqBuyNow = ({ goodsId, ...blessing }) => request.get(`/order/buy/${goodsId}`, blessing)
// 下单
export const reqSubmitOrder = (data) => request.post('/order/submitOrder', data)
// 微信预支付
export const reqAdvancePay = (orderNo) => request.get(`/webChat/createJsapi/${orderNo}`)
// 微信支付状态查询
export const reqPayStatus = (orderNo) => request.get(`/webChat/queryPayStatus/${orderNo}`)
// 获取订单列表
export const reqOrderList = (page, limit) => request.get(`/order/order/${page}/${limit}`)
